package com.thermofisher.service.batch;

import com.thermofisher.service.impl.B1000SYNC;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Configuration
@EnableScheduling
public class JobB1000SYNC
{

    private final Logger logger = LoggerFactory.getLogger(JobB1000SYNC.class);

    @Resource
    private B1000SYNC b1000SYNC;

    @Scheduled(cron = "0 0 */4 * * ?")
    private void update()
    {
        logger.info("定时任务更新data");
        b1000SYNC.update();
    }

}
